﻿using System;
using System.Xml.Serialization;
using TShooter.TfsWord.Common;

namespace TShooter.TfsWord.TeamFoundation
{
    public class ConnectionInfo : ObservableObject
    {
        #region Constructors and member variables

        private DateTime _LastConnection;
        private ConnectionStatus _LastStatus;
        private string _TeamProject;
        private Uri _TeamProjectCollectionUri;

        #endregion

        #region Properties

        [XmlAttribute]
        public DateTime LastConnection
        {
            get { return _LastConnection; }
            set
            {
                _LastConnection = value;
                OnPropertyChanged("LastConnection");
            }
        }

        [XmlAttribute]
        public ConnectionStatus LastStatus
        {
            get { return _LastStatus; }
            set
            {
                _LastStatus = value;
                OnPropertyChanged("LastStatus");
            }
        }

        [XmlElement]
        public string TeamProject
        {
            get { return _TeamProject; }
            set
            {
                _TeamProject = value;
                OnPropertyChanged("TeamProject");
            }
        }

        [XmlElement]
        public Uri TeamProjectCollectionUri
        {
            get { return _TeamProjectCollectionUri; }
            set
            {
                _TeamProjectCollectionUri = value;
                OnPropertyChanged("TeamProjectCollectionUri");
            }
        }

        #endregion
    }
}